from com.mysqlconnection import mysql_connect
from  init_cs import dictfetchall
compute_offerings_sql='SELECT s.id,NAME,cpu,speed,ram_size,ha_enabled,vm_type,s.nw_rate,d.use_local_storage,host_tag FROM disk_offering AS d,service_offering AS s WHERE d.id = s.id AND d.removed IS NULL'

    
def listcompute_offerings():
    cnn=mysql_connect()
    cnn.execute(compute_offerings_sql)
    return dictfetchall(cnn)